home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 001-100 / 001-025 / 008 / src / unixxface.c < prev    next >
C/C++ Source or Header  |  1995-03-17  |  962b  |  78 lines

  1. #include <stdio.h>
  2. #include <libraries/dosextens.h>
  3.  
  4. int getpid()
  5.    {
  6.    long now[3];
  7.  
  8.    DateStamp(&now);
  9.  
  10.    return(now[0] ^ now[1] ^ now[2]);
  11.    }
  12.  
  13. int *signal(num,func)
  14. int num;
  15. int *func;
  16.    {
  17.    return(NULL);
  18.    }
  19.  
  20.  
  21. getenv(var)
  22. char *var;
  23.    {
  24.    return(NULL);
  25.    }
  26.  
  27.  
  28. execl()
  29.    {
  30.    /* this should flag an error */
  31.    }
  32.  
  33.  
  34. chdir(dir)
  35. char *dir;
  36.    {
  37.    struct FileLock *lock;
  38.  
  39.    if ( (lock = Lock(dir, ACCESS_READ)) == NULL)
  40.     return(1);  /* cannot find the directory */
  41.  
  42.    CurrentDir( lock );
  43.  
  44.    /* change to the desired directory */
  45.    return(0);  /* phoney success */
  46.    }
  47.  
  48.  
  49. char *getlogin()
  50.    {
  51.    /* return the login name - perhaps we can use getenv */
  52.    return (NULL);
  53.    }
  54.  
  55. perror(string)
  56. char *string;
  57.    {
  58.    myprintf("Call to perror for '%s'\n", string);
  59.    }
  60.  
  61. char *index(p,c)
  62. char *p;
  63. char c;
  64.    {
  65.    char *strchr();
  66.  
  67.    return(strchr(p,c));
  68.    }
  69.  
  70. char *rindex(p,c)
  71. char *p;
  72. char c;
  73.    {
  74.    char *strrchr();
  75.  
  76.    return(strrchr(p,c));
  77.    }
  78.